package com.study.design.model.structPattern.proxy.dynamicProxy;

import java.lang.reflect.Proxy;

import org.junit.Test;

/**
* @Name: Client
* @Description: 动态代理测试类
* @Author: 李超	lc_jack@foxmail.com
* @CreateDate: 2017-2-10 下午9:11:10 
* @Version: V1.0
 */
public class Client {
	
	@Test
	public void test() {
		RealStar zjl = new RealStar() ;
		StarHandle handle = new StarHandle(zjl) ;
		Star proxy = (Star) Proxy.newProxyInstance(ClassLoader.getSystemClassLoader(), new Class[]{Star.class}, handle) ;
		proxy.sing() ;
	}

}
